package com.caiyouxi.finance.mapper;

import com.caiyouxi.finance.model.Coupons;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;

/**
 * Created by Administrator on 2017/10/18.
 */
@Mapper
public interface CouponsMapper {

    //查询
    public Coupons select_coupons(Integer id);
    //增加
    public int add_coupons(Coupons bean);

    //修改
    public int update_coupons(Coupons bean);

    //删除
    public int delete_coupons(Coupons bean);

    //查询所有
    public List<Coupons> get_coupons_list();

    //查询有用的券信息（券种类开启券批次状态可用券状态可用且在有效期）
    public List<Coupons> get_coupons_usefull_list(HashMap<String,Object> map);

    public void update_coupons_by_trade_id(HashMap<String,Object> map);

    //分页查询
    List<Coupons> select_coupons_list(Coupons bean);
    //查询条数
    int coupons_list_counts(Coupons bean);
}
